package com.rlz.base.util

import android.widget.Toast
import com.rlz.base.app.Base.Companion.obtain

/**
 * Created by RLZ
 * on 2021/5/13
 *
 */
class ToastUtils {
    /**
     * 显示Toast
     *
     */
    companion object {

        private var sToast: Toast? = null

        @JvmStatic
        fun showToast(message: String?) {
            if (sToast != null) {
                sToast!!.cancel()
            }
            sToast = Toast.makeText(obtain(), message, Toast.LENGTH_SHORT)
            sToast?.show()
        }
    }
}